<header id="topbar" class="affix">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">策略详情</a>
            </li>
            <li class="crumb-link">
                <a href="#op/strategy/">策略管理</a>
            </li>
            <li class="crumb-trail">策略编辑</li>
        </ol>
    </div>
    <div class="pull-right">
        <a href="javascript:;" class="btn btn-primary btn-sm light fw600 ml10 template-save"><span class="fa fa-save"></span>保存</a>
    </div>
</header>
<section id="content">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-icon"><i class="fa fa-gear text-primary"></i>
            </span>
            <span class="panel-title">参数设置</span>
        </div>
        <div class="panel-body">
            <form id="template-form" class="form-horizontal">
                <div class="form-group">
                    <label for="inputTitle" class="col-md-2 control-label">策略名称：</label>
                    <div class="col-md-8">
                        <input type="text" id="inputTitle" class="form-control" value="<%= info.title %>" placeholder="请输入策略名称..." required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputMchId" class="col-md-2 control-label">商户编号：</label>
                    <div class="col-md-8">
                        <select class="required form-control search-select" id="inputMchId">
                            <% _.each(mchs, function(mch){ %>
                                <option value="<%= mch.id %>" <%= info.mch_id == mch.id ? 'selected' : '' %>><%= mch.name %>(<%= mch.id %>)</option>
                            <% }) %>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputChns" class="col-md-2 control-label">关联渠道：</label>
                    <div class="col-md-8">
                        <input type="text" id="inputChns" class="form-control" value="<%= info.chns %>" placeholder="关联渠道号，英文逗号分隔...留空表示全渠道">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputContent" class="col-md-2 control-label">策略正文：</label>
                    <div class="col-md-8">
                    <textarea id="inputContent" class="form-control" value="<%= info.content %>" placeholder="请输入策略正文，json格式" required>
                    <%= info.content %>
                    </textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputStatus" class="col-md-2 control-label">策略状态：</label>
                    <div class="col-md-8">
                        <select class="required form-control search-select" id="inputStatus">
                            <% _.each(CHANNEL_STATUS, function(v, k){ %>
                                <option value="<%= k %>" <%= info.status == k ? 'selected' : '' %>><%= v %></option>
                            <% }) %>
                        </select>
                    </div>
                </div>
            </form>
        </div>
    </div>

</section>
